package org.aplikator.server.descriptor;

import org.aplikator.client.descriptor.QueryParameter;
import org.aplikator.server.Context;
import org.aplikator.server.query.QueryExpression;

public interface QueryGenerator {
    QueryParameter[] getQueryParameters(Context ctx);

    QueryExpression createWhere(QueryParameter[] queryParameters, Context ctx);

    /**
     * Default implementation
     * 
     */
    public static class Empty implements QueryGenerator {

        public QueryParameter[] getQueryParameters(Context ctx) {
            return new QueryParameter[] {};
        }

        public QueryExpression createWhere(QueryParameter[] queryParameters, Context ctx) {
            return null;
        }
    }
}
